/*
  Copyright 2009 Smart Enterprise Solution Corp.
  Email: contact@ses.vn - Website: http://www.ses.vn
  KimNgan Project.
*/
using System;
using System.Data;
using System.Configuration;
using System.Collections;

using SES.CMS.DAL;
using SES.CMS.DO;
/// <summary>
/// Summary description for cmsSanPhamBL
/// </summary>
namespace SES.CMS.BL 
{
    public class cmsSanPhamBL 
    {
    	#region Private Variables
		cmsSanPhamDAL objcmsSanPhamDAL;
		#endregion
		
        #region Public Constructors
        public cmsSanPhamBL()
        {
            //
            // TODO: Add constructor logic here
            //
            objcmsSanPhamDAL=new cmsSanPhamDAL();
        }
        #endregion       

        #region Public Methods
        public int Insert(cmsSanPhamDO objcmsSanPhamDO)
        {
            return objcmsSanPhamDAL.Insert(objcmsSanPhamDO);
        }

        public int Update(cmsSanPhamDO objcmsSanPhamDO)
        {
             return objcmsSanPhamDAL.Update(objcmsSanPhamDO);

        }

        public int Delete(cmsSanPhamDO objcmsSanPhamDO)
        {
             return objcmsSanPhamDAL.Delete(objcmsSanPhamDO);

        }
        public int DeleteByLoaiSanPham(int loaiSanPhamID)
        {
            return objcmsSanPhamDAL.DeleteByLoaiSanPham(loaiSanPhamID);
        }

        public void UpdateAll(int stt, int[] spid, long[] dongia)
        {
            objcmsSanPhamDAL.UpdateAll(stt, spid, dongia);
        }

         public int DeleteAll()
        {
             return objcmsSanPhamDAL.DeleteAll();
        }

         public cmsSanPhamDO Select(cmsSanPhamDO objcmsSanPhamDO)
         {
             return objcmsSanPhamDAL.Select(objcmsSanPhamDO);
         }
         public cmsSanPhamDO SelectByMaSP(string ma)
         {
             return objcmsSanPhamDAL.SelectByMaSP(ma);
         }
         public DataTable SelectByID(cmsSanPhamDO objcmsSanPhamDO)
         {
             return objcmsSanPhamDAL.SelectByID(objcmsSanPhamDO);
         }

        public ArrayList SelectAll1( )
        {
         return objcmsSanPhamDAL.SelectAll1();
        }

        public DataTable SelectAll()
        {
            return objcmsSanPhamDAL.SelectAll();
        }
        public DataTable SelectAllNew(int i)
        {
            return objcmsSanPhamDAL.SelectAllNew(i);
        }
        public DataTable SelectAllBanChay()
        {
            return objcmsSanPhamDAL.SelectAllBanChay();
        }
        public DataTable NewestProduct()
        {
            return objcmsSanPhamDAL.NewestProduct();
        }
        public DataTable SelectByi(int i, int id)
        {
            return objcmsSanPhamDAL.SelectByi(i, id);
        }

        public DataTable SelectByLoaiSPAndNhanHieu(int loai, int nhanhieu)
        {
            return objcmsSanPhamDAL.SelectByLoaiSPAndNhanHieu(loai, nhanhieu);
        }
     
        public DataTable SelectByLoaiSanPhamID(int LoaiSanPhamID)
        {
            return objcmsSanPhamDAL.SelectByLoaiSanPhamID(LoaiSanPhamID);
        }

        public DataTable SelectBySanPhamID(int SanPhamID)
        {
            return objcmsSanPhamDAL.SelectBySanPhamID(SanPhamID);
        }

        public DataTable TimKiem(string keyword)
        {
            return objcmsSanPhamDAL.TimKiem(keyword);
        }
        public DataTable SelectbyTagItem(string Tag)
        {
            return objcmsSanPhamDAL.SelectbyTagItem(Tag);
        }
        public DataTable SelectAllbyLoaiSanPhamID(int LoaiSanPhamID)
        {
            return objcmsSanPhamDAL.SelectAllbyLoaiSanPhamID(LoaiSanPhamID);
        }
        public DataTable SelectbyNhanHieuID(int NhanHieuID)
        {
            return objcmsSanPhamDAL.SelectbyNhanHieuID(NhanHieuID);
        }
        public cmsSanPhamDO SelectByMaSanPham(cmsSanPhamDO objcmsSanPhamDO)
        {
            return objcmsSanPhamDAL.SelectByMaSanPham(objcmsSanPhamDO);
        }
        public int InsertOrUpdate(cmsSanPhamDO objcmsSanPhamDO)
        {
            return objcmsSanPhamDAL.InsertOrUpdate(objcmsSanPhamDO);
        }
        public DataTable SelectByLoaiSanPham(int loaiSanPhamID)
        {
            return objcmsSanPhamDAL.SelectByLoaiSanPham(loaiSanPhamID);
        }
        public DataTable SelectSameCate(int sanPhamID)
        {
            return objcmsSanPhamDAL.SelectSameCate(sanPhamID);
        }
        public DataTable Filter(int LoaiSanPhamID, string keyword)
        {
            return objcmsSanPhamDAL.Filter(LoaiSanPhamID, keyword);
        }
#endregion          
    
    }

}
